package com.zbkj.admin.boot.props;

import com.zbkj.admin.boot.launch.MicaLogLevel;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;


/**
 * 日志配置
 *
 * @author L.cm
 */
@Getter
@Setter

@ConfigurationProperties(MicaLogProperties.PREFIX)
public class MicaLogProperties {
	public static final String PREFIX = "mica.log";

	/**
	 * Spring Mapping 的日志
	 */
	private Mapping mapping = new Mapping();

	/**
	 * 请求响应的日志界别
	 */
	private Request request = new Request();

	@Getter
	@Setter
	public static class Mapping {
		/**
		 * 是否开启路由的日志，默认：false
		 */
		private Boolean enable = Boolean.FALSE;
	}

	@Getter
	@Setter
	public static class Request {
		/**
		 * 日志级别配置，默认：BASIC
		 */
		private MicaLogLevel level = MicaLogLevel.BASIC;

		private Boolean enable = Boolean.TRUE;
	}

}
